<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        /*var a = 0;
        var b = null;
        var c = undefined;
        var d = NaN;
        var e = "";
        alert(Boolean(a)); // false
        alert(Boolean(b)); // false
        alert(Boolean(c)); // false
        alert(Boolean(d)); // false
        alert(Boolean(e)); // false*/

        /* &&运算 */
        var a = "abc";
        var b = true;
        var c = null
        var d = false

        /*alert(a && b); // true = true
        alert(b && a); // "abc" = true
        alert(c && d); // null = false
        alert(d && c); // false = false*/

        /* ||运算 */
        alert(c || d); // false = false
        alert(d || c); // null = false
        alert(a || c); // "abc" = true
        alert(b || c); // true = true
    </script>
</head>
<body>

</body>
</html>